import {
  APPOINT_STEP_INIT,
  APPOINT_STEP_CHANGE
  } from '../actions';
import { updateState } from '../utils';
  
  const INITIAL_STATE = {
    data: {}
  };

  export default function (state = INITIAL_STATE, action = {}) {
    switch (action.type) {
      case APPOINT_STEP_INIT:
        {
          return {  ...state, ...INITIAL_STATE }
        }
      case APPOINT_STEP_CHANGE:
        {
          return updateState(state, action.data);  
        }
      default:
        return state;
    }
  }